﻿using System;
using SimpleExcel;
using System.Collections.Generic;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("启动程序");
            using (var workbook = new WorkBook(@"F:\05苏州-残疾人.xlsx"))
            {
                var sheet = workbook.GetSheet(0);
                Console.WriteLine("读取工作表成功！");
                var list = new List<Person>();
                for(int i = 0; i < sheet.Rows.LastRowNum; i++)
                {
                    list.Add(new Person()
                    {
                        Name = sheet.Rows[i][2].Value,
                        Card = sheet.Rows[i][3].Value
                    });
                }
                Console.WriteLine("数据转换成功！");
            }
            Console.WriteLine("程序完成！");
            Console.Read();
        }
    }

    class Person
    {
        public string Name { get; set; }
        public string Card { get; set; }
    }
}
